// import uris from './uris'
import Vue from 'vue'
import responseHandler from './response-handler'


export default function(params, success, fail) {

  function makeData (originalData) {
    console.log(originalData)
    return originalData
  }

  params['methodName'] = 'DrivingRecordShot'
    this.$.get(params)
      .then(responseHandler.success(success, fail, makeData), responseHandler.error(fail))

  // Vue.prototype.$.get({
  //   carId: params.carId,
  //   type: params.type,
  //   channelType: params.channelType,
  //   methodName: 'DrivingRecordShot'
  // }).then((response)=>{
  //   success && success(response.data)
  // },(response)=>{
  //   console.log(response)
  //   fail && fail(response.errorMessage || '错误：'+response.resultCode)
  // })
}
